
package prueba.ciclodevida;

import javax.faces.event.PhaseEvent;
import javax.faces.event.PhaseListener;
import javax.faces.event.PhaseId;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;


public class DepuracionListener implements PhaseListener {

    private static final Log log = LogFactory.getLog(DepuracionListener.class);
    
    @Override
    public void afterPhase(PhaseEvent event) {
        if(log.isInfoEnabled()){
            log.info("AFTER PHASE"+ event.getPhaseId().toString());
        }
    }

    @Override
    public void beforePhase(PhaseEvent event) {
         if(log.isInfoEnabled()){
            log.info("BEFORE PHASE"+ event.getPhaseId().toString());
        }
    }

    @Override
    public PhaseId getPhaseId() {
        return PhaseId.ANY_PHASE;
    }
    
}
